#ifndef PADDLE_H
#define PADDLE_H

#include <QtGui>

class Paddle : public QGraphicsItem
{
public:
     Paddle(int x, int y, int width, int heigth, bool isLeftPaddle);
     Paddle();
     ~Paddle();
     QRectF boundingRect() const;
     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option = 0, QWidget *widget = 0);
     QPainterPath shape() const;
     void goUp();
     void goDown();
     void setSpeed(int newspeed);
     void checkWallCollisions(bool goingUp);
     void calculateCCAngles();
     bool getIsLeftPaddle();
     double leftTopCCAngle, rightTopCCAngle, leftBottomCCAngle, rightBottomCCAngle;
private:
     int width, heigth, speed;
     bool canGoUp, canGoDown, isLeftPaddle;
 };

#endif // PADDLE_H
